//
//  FreeColorController.m
//  PersonalTool
//
//  Created by Samuel on 3/23/15.
//  Copyright (c) 2015 Samuel. All rights reserved.
//

#import "FreeColorController.h"
#import "LSCirleColorPicker.h"
#import "UIViewController+Base.h"

@interface FreeColorController ()

@end

@implementation FreeColorController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setLeftButtonWithBack];
    
    LSCirleColorPicker *aa = [[LSCirleColorPicker alloc]initWithFrame:CGRectMake(10, 100, 300, 300)];
    [self.view addSubview:aa];
    
    aa.colorDelegate = self;
//    UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)];
//    
//    [aa addGestureRecognizer:pan];
    
    
    
    
}

- (void)returnTheUIColor:(UIColor *)color
{
    [self.navigationController.navigationBar setBackgroundColor:color];
    [self.aaaa setBackgroundColor:color];
}

/* 识别拖动 */
//- (void)handlePan:(UIPanGestureRecognizer *)gestureRecognizer {
//    CGPoint location = [gestureRecognizer locationInView:self.view];
//    NSLog(@"%f,%f",location.x,location.y);
//    //    [self drawImageForGestureRecognizer:gestureRecognizer atPoint:location underAdditionalSituation:nil];
//    //    //gestureRecognizer.view.center = CGPointMake(gestureRecognizer.view.center.x + location.x, gestureRecognizer.view.center.y + location.y);
//    //    [gestureRecognizer setTranslation:location inView:self.view];
//}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
